package web_model

import (
	"github.com/shopspring/decimal"
	"time"

	"gorm.io/gorm"
)

const TableNameTransTrustee = "trans_trustee"

// TransTrustee mapped from table <trans_trustee>
type TransTrustee struct {
	ID           int64           `gorm:"column:id;type:INTEGER;primaryKey" json:"id"`
	Name         string          `gorm:"column:name;type:TEXT" json:"name"`
	ShortName    string          `gorm:"column:short_name;type:TEXT" json:"short_name"`
	Code         string          `gorm:"column:code;type:TEXT" json:"code"`
	Province     string          `gorm:"column:province;type:TEXT" json:"province"`
	ProvinceCode string          `gorm:"column:province_code;type:TEXT" json:"province_code"`
	City         string          `gorm:"column:city;type:TEXT" json:"city"`
	CityCode     string          `gorm:"column:city_code;type:TEXT" json:"city_code"`
	County       string          `gorm:"column:county;type:TEXT" json:"county"`
	CountyCode   string          `gorm:"column:county_code;type:TEXT" json:"county_code"`
	Addr         string          `gorm:"column:addr;type:TEXT" json:"addr"`
	DispArea     string          `gorm:"column:disp_area;type:TEXT" json:"disp_area"`
	Contact      string          `gorm:"column:contact;type:TEXT" json:"contact"`
	Telephone    string          `gorm:"column:telephone;type:TEXT" json:"telephone"`
	ShortCode    string          `gorm:"column:short_code;type:TEXT" json:"short_code"`
	DeliveryAddr string          `gorm:"column:delivery_addr;type:TEXT" json:"delivery_addr"`
	RouteID      int64           `gorm:"column:route_id;type:INTEGER" json:"route_id"`
	RouteName    string          `gorm:"column:route_name;type:TEXT" json:"route_name"`
	Lat          decimal.Decimal `gorm:"column:lat;type:decimal" json:"lat"`
	Lng          decimal.Decimal `gorm:"column:lng;type:decimal" json:"lng"`
	Status       string          `gorm:"column:status;type:char" json:"status"`
	CreatedAt    time.Time       `gorm:"column:created_at;type:DATETIME" json:"created_at"`
	UpdatedAt    time.Time       `gorm:"column:updated_at;type:DATETIME" json:"updated_at"`
	DeletedAt    gorm.DeletedAt  `gorm:"column:deleted_at;type:DATETIME" json:"deleted_at"`
	CreatedBy    string          `gorm:"column:created_by;type:TEXT" json:"created_by"`
	UpdatedBy    string          `gorm:"column:updated_by;type:text" json:"updated_by"`
}

// TableName TransTrustee's table name
func (*TransTrustee) TableName() string {
	return TableNameTransTrustee
}
